import {debounce} from "./utils";

export const itemListerMixin = {
    data() {
        return {
            debounceRefresh:null,
            itemImageListener:null
        }
    },
    mounted() {
        this.debounceRefresh = debounce(this.$refs.scroll.refresh,100);
        this.itemImageListener = ()=> {
            this.debounceRefresh()
        }
        this.$bus.$on('itemImageLoad',this.itemImageListener)
    }
}